import request from '@/utils/request'
// 获取部门数据列表
export function getDepartmentList() {
  return request({
    url: '/company/department'
  })
}
// 获取部门负责人列表
export function getManagerList() {
  return request({
    url: '/sys/user/simple'
  })
}
// 新增部门列表
export function addDepartment(data) {
  return request({
    url: '/company/department',
    method: 'POST',
    data
  })
}
// 部门列表信息回显
export function getDepartmentDetail(id) {
  return request({
    url: `/company/department/${id}`
  })
}
// 编辑部门列表详情
export function updateDepartment(data) {
  return request({
    url: `/company/department/${data.id}`,
    method: 'put',
    data
  })
}
// 删除部门
export function delDepartment(id) {
  return request({
    url: `/company/department/${id}`,
    method: 'delete'
  })
}
